<?php
session_start();
$sessionid = session_id();
$servername = "localhost";
$username = "root";
$password = "wgz52157";
$dbname = "myFirstDB";
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
$income=10;
$incomeout = mysqli_query($conn, "SELECT *FROM MyUsers WHERE id='$sessionid'");
while ($group = mysqli_fetch_array($incomeout)) {
    $income = $group['allincome'];
}

echo $income;
?>
